<?php

/**

 * @package WordPress

 * @subpackage APrints_Theme

 */

?>

<?php

/*

Template Name: Tags

*/

?>

<?php get_header();?>

<div id="content" >
    <h2>Browse by tag</h2>
    <?php if(function_exists("ap_tag_list")):?>
    <div class="tagindent">
	    <?php 
	    	if(isset($_GET["tagview"])){ 
	    		if($_GET["tagview"] == "cloud") {
	    			echo '<a class="tagview" id="tagswitch_list" title="Browse as list" href="?tagview=list">Browse as list</a> | <a class="tagviewselected" id="tagswitch_cloud" title="Tag Cloud">Tag Cloud</a>';
	    		}else{ 
	    			echo '<a class="tagviewselected" id="tagswitch_list" title="Browse as list" >Browse as list</a> | <a class="tagview" id="tagswitch_cloud" title="Tag Cloud" href="?tagview=cloud">Tag Cloud</a>';
	    		} 
	    	} else {
	    		echo '<a class="tagviewselected" id="tagswitch_list" title="Browse as list" >Browse as list</a> | <a class="tagview" id="tagswitch_cloud" title="Tag Cloud" href="?tagview=cloud">Tag Cloud</a>';
	    	}
	    ?>
	</div>
			<div id="taglist" <?php if(isset($_GET["tagview"])){ if($_GET["tagview"] == "cloud") {echo "style=display:none;";}else{ echo "style=display:block;";} } ?>>
		    <?php 
			    ap_tag_list();
			?>	
		</div>
		<div id="tagcloud" <?php if(isset($_GET["tagview"])){ if($_GET["tagview"] == "list") { echo "style=display:none;";}else{ echo "style=display:block;";} } ?>>
		    <ul>
		
		        <?php wp_tag_cloud('number=0'); ?>
		
		    </ul>
		</div>	
	<?php else: ?>
		    <ul>
		
		        <?php wp_tag_cloud('number=0'); ?>
		
		    </ul>	
	<?php endif;?>
		<br />
</div>

<?php get_footer();?>